package com.ss.android.common.ad;

import org.json.JSONObject;

final class EventModel {
    private String mTag;
    private String mLabel;
    private long mAdId;
    private long mExtValue;
    private JSONObject mExtJson;
    private long mTimeStamp = System.currentTimeMillis();
    EventModel(String tag, String label, long adId, long extValue, JSONObject extJson) {
        this.mTag = tag;
        this.mLabel = label;
        this.mAdId = adId;
        this.mExtValue = extValue;
        this.mExtJson = extJson;
    }

    public final boolean isValid() {
        boolean v0 = false;
        try {
            if(android.support.design.a.isTextEmpty(this.mTag)) {
                return v0;
            }

            if(android.support.design.a.isTextEmpty(this.mLabel)) {
                return v0;
            }

            if(this.mAdId < 1000000000) {
                return v0;
            }

            if(this.mExtJson == null) {
                return v0;
            }

            if(this.mExtJson.get("log_extra") == null) {
                return v0;
            }
        }
        catch(Exception v1) {
            v1.printStackTrace();
            return v0;
        }

        return true;
    }

    public final boolean equals(Object arg7) {
        boolean v0 = false;
        if(arg7 != null && ((arg7 instanceof EventModel)) && (android.support.design.a.isTextEquals(this.mTag, ((EventModel)arg7).mTag)) && (android.support.design.a.isTextEquals(this.mLabel, ((EventModel)arg7).mLabel)) && this.mAdId == ((EventModel)arg7).mAdId && this.mExtValue == ((EventModel)arg7).mExtValue && Math.abs(this.mTimeStamp - ((EventModel)arg7).mTimeStamp) <= 200) {
            v0 = true;
        }

        return v0;
    }

    public final int hashCode() {
        return this.mTag.hashCode() + this.mLabel.hashCode() + (((int)this.mAdId)) + (((int)this.mExtValue));
    }
}

